import request from '@/utils/myRequest'

// 获取文章列表
function findArticles(start, limit, data) {
  return request({
    url: `/lejuAdmin/productArticle/findArticles/${start}/${limit}`,
    data,
    method: 'POST'
  })
}
// 查找文章明细
function productArticle(id) {
  return request({
    url: `/lejuAdmin/productArticle/productArticle/${id}`

  })
}
// 删除文章
function delArticle(id) {
  return request({
    url: `/lejuAdmin/productArticle/del/${id}`,
    method: 'DELETE'
  })
}
// 更新文章显示状态
function changeShowStatus(data) {
  return request({
    url: '/lejuAdmin/productArticle/changeShowStatus',
    method: 'POST',
    data
  })
}
// 新增文章addArticle
function addArticle(data) {
  return request({
    url: '/lejuAdmin/productArticle/addArticle',
    data,
    method: 'POST'
  })
}
// 修改文章 POST
function updateArticle(data) {
  return request({
    url: '/lejuAdmin/productArticle/updateArticle',
    data,
    method: 'POST'
  })
}
export { findArticles, delArticle, changeShowStatus, addArticle, productArticle, updateArticle }
